The problem was purely syntactic: 
instead of "\\src\\resources" in
File resourcesDir = new File(projectDir, "\\src\\resources");
I accidentally mistyped "\\src\\resorces" (the 'u' was omitted) 
and consequently the returned resourcesDir did not point to the resources subfolder, 
so the returned list of filenames was null.

I corrected it and it works now :)
